<template>
	<view class="bigbox">
		<!-- banner图片 -->
		<view class="bannerimg">
			  <u-swiper :list="list" height="320"></u-swiper>
			  <!-- <image src="" mode="aspectFit"></image> -->
		</view>
			
		<!-- //banner图片 -->

		<!-- 企业信息盒子 -->
		<view class="infobox flex row-between h140 col-center mt40">
			<!-- 左边的盒子 -->
			<view class="infobox-l flex row-column row-around">
				<text class="fs40 text-tit">{{data.enterprise_name}}</text>
				<text v-if="data.number_end>999">{{data.number_end}}人以上/</text>
				<text v-else><text>{{data.number_start}}-</text> <text>{{data.number_end}}</text>人/</text>
				<text>{{data.enterprise_type}}</text>
			</view>
			<!-- 右边的盒子 -->
			<view class="infobox-r">
				<image :src="$baseUrl+data.logo_image" class="w120 h120"></image>
			</view>
		</view>
		<!-- /企业信息盒子 -->

		<!-- 企业地址盒子 -->
		<!-- 上边的盒子 -->
		<view class="mt50">
			<view class="infobox-l ">
				<text>企业地址</text>
			</view>
			<!-- 下边的盒子 -->
			<view class="infobox-r flex mt40 row-between" @tap.stop="goMap()">
				<text>{{data.position}}</text>
				<view class="flex row-column row-center col-center">
					<image src="../../../static/img/index/11blue-nav.png" class="w28 h28"></image>
					<view class="">
						地图/导航
					</view>
				</view>
			</view>
		</view>
		<!-- //企业地址盒子 -->

		<!-- 企业介绍盒子 -->
		<view class="mt80 introduceBox">
			<text>企业介绍</text>
			<!-- <view class="u-line-4 mt40">{{data.enterprise_content}}</view> -->
			<view class="mt20">
				<u-read-more showHeight="140">
				    <rich-text :nodes="data.enterprise_content"></rich-text>
				</u-read-more>	
			</view>
			
		</view>
		<!-- //企业介绍盒子 -->
		
		<!-- 视频介绍盒子 -->
		<view class="videobox mt80 ">
			<text>视频介绍</text>
			<video :src="$baseUrl+data.videofile" controls class="mt52"></video>
		</view>
		<!-- //视频介绍盒子 -->
	</view>
</template>

<script>
	export default {
		name:'enterpriseDetail',	
		 onLoad() {
			 console.log(this.list);
		 		this.data =uni.getStorageSync('enterpriseDetail')
		 		this.listhandel()	
		 },
		data() {
			return {
				data:{},
				list: []
				// banner:[]
			};
		},
		methods:{
			listhandel() {
				console.log(this.$baseUrl)
				uni.getStorageSync('enterpriseDetail').images.map(item=>{
					let obj={}
					obj.image=this.$baseUrl+item
					this.list.push(obj)
				})
				console.log('111',this.list)
			},
			goMap() {
				var dst = new plus.maps.Point(this.data.longitude || 0, this.data.latitude || 0);
				// var src = new plus.maps.Point(this.data.myX, this.data.myY); 
				// 调用系统地图显示 
				plus.maps.openSysMap(dst, this.data.position, dst);
			},
		}
	}
</script>

<style lang="scss">
	page {
		background-color: #fff;
	}

	.bannerimg {
		width: 100%;
		height: 334rpx;
		margin-top: 40rpx;

		image {
			width: 100%;
			height: 100%;
		}
	}

	.infobox-l {
		height: 100%;
	}
	.introduceBox {
		
	}
	.videobox {
		video{
			width: 100%;
			height: 334rpx;
			border-radius: 14rpx;
		}
	}
	.text-tit,
	text,
	view{
		color:#0C162E;
	}
</style>
